package gaml.testing;

import gaml.error.GamlException;
import gaml.text.TextNodeBridge;
import gaml.text.YamlParserStore;
import gaml.text.YamlText;
import gaml.text.parser.ScalarNodeParser;
import gaml.yaml.ScalarNode;
import gaml.yaml.ahchor.YamlAnchorCodeStore;

import org.junit.Test;


public class ScalarNodeParserTest {
	final static String scalarNode = "&testanchor >testvalue\n	testvalue1str2\n	testvalue1str3\n>testvalue2";
	
	@Test
	public void testParseText () throws GamlException {
		YamlText text = new YamlText ().read (scalarNode);
		
		ScalarNode node = new ScalarNode (null);

		System.out.println (new TextNodeBridge (text, node).parseText (new YamlParserStore (new ScalarNodeParser (new YamlAnchorCodeStore ()))).getNode ().getValue ());
	}
	
//	@Test
//	public void testParseLine () throws GamlException {
//		YamlLine line = new YamlLine ("		&testanchor > testvalue", "\t", 0);
//		System.out.println (line.getValue ());
//	}
}